home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / limits.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-23  |  1.2 KB  |  61 lines  |  [TEXT/MMCC]

  1. /* limits.h standard header -- 8-bit version */
  2. #ifndef _LIMITS
  3. #define _LIMITS
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7. #if _BITS_BYTE != 8
  8.  #error <limits.h> assumes 8 bits per byte
  9. #endif
  10.  
  11. #if __MWERKS__
  12. #pragma options align=mac68k
  13. #endif
  14.  
  15.         /* char properties */
  16. #define CHAR_BIT    8
  17. #if _CSIGN
  18. #define CHAR_MAX    127
  19. #define CHAR_MIN    (-127-_C2)
  20. #else
  21. #define CHAR_MAX    255
  22. #define CHAR_MIN    0
  23. #endif
  24.         /* int properties */
  25. #if _ILONG
  26. #define INT_MAX        2147483647
  27. #define INT_MIN        (-2147483647-_C2)
  28. #define UINT_MAX    4294967295U
  29. #else
  30. #define INT_MAX        32767
  31. #define INT_MIN        (-32767-_C2)
  32. #define UINT_MAX    65535U
  33. #endif
  34.         /* long properties */
  35. #define LONG_MAX    2147483647
  36. #define LONG_MIN    (-2147483647-_C2)
  37.         /* multibyte properties */
  38. #define MB_LEN_MAX    _MBMAX
  39.         /* signed char properties */
  40. #define SCHAR_MAX    127
  41. #define SCHAR_MIN    (-127-_C2)
  42.         /* short properties */
  43. #define SHRT_MAX    32767
  44. #define SHRT_MIN    (-32767-_C2)
  45.         /* unsigned properties */
  46. #define UCHAR_MAX    255U
  47. #define ULONG_MAX    4294967295U
  48. #define USHRT_MAX    65535U
  49.  
  50. #if __MWERKS__
  51. #pragma options align=reset
  52. #endif
  53.  
  54. #endif
  55.  
  56. /*
  57.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  58.  * Consult your license regarding permissions and restrictions.
  59.  */
  60.  
  61.